<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('shop/index')}">店铺列表</a></li>
        <li><a href="{:url('shop/add')}">添加店铺</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('shop/index')}">
        店铺名称:
        <input type="text" class="form-control" name="name" value="{:input('request.name/s','')}" placeholder="请输入店铺名称">
        状态:
        <select name="status" class="form-control">
            <option <if condition="$status eq 0"> selected </if> value="">--全部--</option>
            <option <if condition="$status eq 1"> selected </if> value="1">--审核通过--</option>
            <option <if condition="$status eq 2"> selected </if> value="2">--未审核--</option>
            <option <if condition="$status eq 3"> selected </if> value="3">--审核拒绝--</option>
        </select>
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('shop/index')}">清空</a>
    </form>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th>ID</th>
                <th>店铺名称</th>
                <th>登陆账号</th>
                <th>经度</th>
                <th>纬度</th>
                <th>地址</th>
                <th>状态</th>
                <th>推荐人</th>
                <th>添加时间</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="shop" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.user_login}</td>
                    <td>{$vo.lng}</td>
                    <td>{$vo.lat}</td>
                    <td>{$vo.address}</td>
                    <if condition="$vo['status']  eq 1">
                    <td>审核通过</td>
                    </if>
                    <if condition="$vo['status']  eq 2">
                    <td>未审核</td>
                    </if>
                    <if condition="$vo['status']  eq 3">
                    <td>审核拒绝</td>
                    </if>
                    <td>{$vo.pname}</td>
                    <td>{$vo.addtime}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('shop/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-info" href="{:url('shop/goods',array('id'=>$vo['id']))}">店铺商品</a>
                        <a class="btn btn-xs btn-danger" href="{:url('shop/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">
                            {:lang('DELETE')}
                        </a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page|default=''}</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>